[Linux] network I/F, G/W, DNS 설정  +   [Desktop/Linux]   |  2015.05.27 18:23

네트워크 설정

# ifconfig eth0 192.168.2.100 netmask 255.255.255.0 broadcast 192.168.2.255


게이트웨이 설정

# route add default gw 192.168.2.1 dev eth0


Check existing route


~$ route

Kernel IP routing table

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface

10.0.0.0        *               255.0.0.0       U     0      0        0 eth1

127.0.0.1       *               255.255.255.255 UH    0      0        0 lo

192.168.10.0    *               255.255.255.0   U     0      0        0 eth0


Since there is no route to 172.16.0.1, add it with the following command


FORMAT: route add –net <destination-network> gw <next-hop-gateway>


DNS설정

# vi /etc/resolv.conf

nameserver 8.8.8.8


 
TRACKBACKS 0    COMMENTS 0

 


비밀글로 저장  
 
 
<<이전   | 1 | 2 | 3 | 4 | 5 | 6 | 7 | ··· | 730 |   다음>>
 

rednine's Blog is powered by Daum & tistory