게시물 1,376건
   
ip, subnet, gateway cmd
글쓴이 : 최고관리자 날짜 : 2017-09-13 (수) 13:46 조회 : 20260
글주소 :
                                
리눅스 네트워크 설정 명령어
root@chonnom:~# ifconfig
eth0      Link encap:Ethernet  HWaddr f4:6d:04:d2:ef:96  
          inet addr:192.168.22.223  Bcast:192.168.22.255  Mask:255.255.255.0
          inet6 addr: fe80::f66d:4ff:fed2:ef96/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3580694 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2295005 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3859833859 (3.8 GB)  TX bytes:343340442 (343.3 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4409 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4409 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1089655 (1.0 MB)  TX bytes:1089655 (1.0 MB)


root@chonnom:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.22.1    0.0.0.0         UG    0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0
192.168.22.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0


root@chonnom:~# ifconfig eth0 192.168.22.225 netmask 255.255.255.0
root@chonnom:~# ifconfig
eth0      Link encap:Ethernet  HWaddr f4:6d:04:d2:ef:96  
          inet addr:192.168.22.225  Bcast:192.168.22.255  Mask:255.255.255.0
          inet6 addr: fe80::f66d:4ff:fed2:ef96/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3581282 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2295456 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3859934346 (3.8 GB)  TX bytes:343379879 (343.3 MB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:4432 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4432 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:1091783 (1.0 MB)  TX bytes:1091783 (1.0 MB)


root@chonnom:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.22.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0


root@chonnom:~# route add default gw 192.168.22.1 eth0
root@chonnom:~# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.22.1    0.0.0.0         UG    0      0        0 eth0
192.168.22.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

이름 패스워드
비밀글 (체크하면 글쓴이만 내용을 확인할 수 있습니다.)
왼쪽의 글자를 입력하세요.
   

 



 
사이트명 : 모지리네 | 대표 : 이경현 | 개인커뮤니티 : 랭키닷컴 운영체제(OS) | 경기도 성남시 분당구 | 전자우편 : mojily골뱅이chonnom.com Copyright ⓒ www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.