书到用时方恨少

用命令修改IP

上一篇 / 下一篇  2007-05-30 18:06:30 / 个人分类:Linux

 

  5月15日公司的局域网IP全乱了,在Linux 机器中的phpMyAdmin 就登陆不了,
后来修改了一下ip 就没有问题了。

# ifconfig --help
# ifconfig eth0 192.168.1.71 broadcast 192.168.1.255 netmask 255.255.255.0
# ifconfig eth0 down
# ifconfig eth0 up
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0D:93:29:48:38
inet addr:192.168.1.71 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8899 errors:0 dropped:0 overruns:0 frame:0
TX packets:6470 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:5291207 (5.0 Mb) TX bytes:1137015 (1.0 Mb)
Interrupt:41 Base address:0xb000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4017 errors:0 dropped:0 overruns:0 frame:0
TX packets:4017 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1741982 (1.6 Mb) TX bytes:1741982 (1.6 Mb)

改后要重新加载 eth0
#ifconfig eth0 down
#ifconfig eth0 up


TAG: Linux ip修改 Linux

 

评分:0

我来说两句

Open Toolbar