当前位置: 技术问答>linux和unix
100分问怎么样配IP?
来源: 互联网 发布时间:2015-08-12
本文导语: 系统是linux red hat 9 ,我们网站运行中,服务托管商说要升级系统,另给我两个ip 211.157.10.1 211.157.10.2 GATEWAY:211.157.10.1 MASK:255.255.255.192 我怎么把我的ip改成新ip,且能够...
系统是linux red hat 9 ,我们网站运行中,服务托管商说要升级系统,另给我两个ip
211.157.10.1
211.157.10.2
GATEWAY:211.157.10.1
MASK:255.255.255.192
我怎么把我的ip改成新ip,且能够馬上访问211.157.10.1时能访问到我的主页,如果改了出了问题怎么改回来,且有什么要注意的问题?谢谢.我是极菜的网管,见谅.谢谢.
原ip如下:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:A7:09:AB
inet addr:211.155.254.1 Bcast:211.155.254.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3416455 errors:0 dropped:0 overruns:0 frame:0
TX packets:4046830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:466075116 (444.4 Mb) TX bytes:169944133 (162.0 Mb)
Interrupt:11 Base address:0xdf00 Memory:ff8ff000-ff8ff038
eth0:0 Link encap:Ethernet HWaddr 00:03:47:A7:09:AB
inet addr:211.155.254.2 Bcast:211.155.254.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3416455 errors:0 dropped:0 overruns:0 frame:0
TX packets:4046830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:466075116 (444.4 Mb) TX bytes:169944287 (162.0 Mb)
Interrupt:11 Base address:0xdf00 Memory:ff8ff000-ff8ff038
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:471905 errors:0 dropped:0 overruns:0 frame:0
TX packets:471905 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:242837015 (231.5 Mb) TX bytes:242837015 (231.5 Mb)
211.157.10.1
211.157.10.2
GATEWAY:211.157.10.1
MASK:255.255.255.192
我怎么把我的ip改成新ip,且能够馬上访问211.157.10.1时能访问到我的主页,如果改了出了问题怎么改回来,且有什么要注意的问题?谢谢.我是极菜的网管,见谅.谢谢.
原ip如下:
# ifconfig
eth0 Link encap:Ethernet HWaddr 00:03:47:A7:09:AB
inet addr:211.155.254.1 Bcast:211.155.254.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3416455 errors:0 dropped:0 overruns:0 frame:0
TX packets:4046830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:466075116 (444.4 Mb) TX bytes:169944133 (162.0 Mb)
Interrupt:11 Base address:0xdf00 Memory:ff8ff000-ff8ff038
eth0:0 Link encap:Ethernet HWaddr 00:03:47:A7:09:AB
inet addr:211.155.254.2 Bcast:211.155.254.127 Mask:255.255.255.128
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:3416455 errors:0 dropped:0 overruns:0 frame:0
TX packets:4046830 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:466075116 (444.4 Mb) TX bytes:169944287 (162.0 Mb)
Interrupt:11 Base address:0xdf00 Memory:ff8ff000-ff8ff038
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:471905 errors:0 dropped:0 overruns:0 frame:0
TX packets:471905 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:242837015 (231.5 Mb) TX bytes:242837015 (231.5 Mb)
|
ifconfig eth0 211.157.10.1 gateway 211.157.10.1 netmask 255.255.255.192
ifconfig eth0:0 211.157.10.2 gateway 211.157.10.1 netmask 255.255.255.192
ifconfig eth0:0 211.157.10.2 gateway 211.157.10.1 netmask 255.255.255.192
|
步骤如下:
1.ip address del 211.155.254.1 dev eth0
ip address del 211.155.254.2 dev eth0
2。ip address add 211.157.10.1/26 dev eth0
ip address add 211.157.10.2/26 dev eth0
1.ip address del 211.155.254.1 dev eth0
ip address del 211.155.254.2 dev eth0
2。ip address add 211.157.10.1/26 dev eth0
ip address add 211.157.10.2/26 dev eth0
|
就改个ip而已,只要他们告诉你的没问题就不用担心了
|
使用netconfig命令就可以了吧?
或者使用ifconfig也可以,用man ifconfig看一下帮助吧。
或者使用ifconfig也可以,用man ifconfig看一下帮助吧。
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。