当前位置: 技术问答>linux和unix
外部无法访问这台服务器
来源: 互联网 发布时间:2017-02-07
本文导语: eth0 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F4 inet6 addr: fe80::9e8e:99ff:fe21:d8f4/64 Scope:Link eth1 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F5 inet6 addr: 2001:da8:c000:1...
eth0 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F4
inet6 addr: fe80::9e8e:99ff:fe21:d8f4/64 Scope:Link
eth1 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F5
inet6 addr: 2001:da8:c000:100:9e8e:99ff:fe21:d8f5/64 Scope:Global
inet6 addr: fe80::9e8e:99ff:fe21:d8f5/64 Scope:Link
eth2 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F6
inet addr:192.168.100.128 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: 2001:da8:c000:100:9e8e:99ff:fe21:d8f6/64 Scope:Global
inet6 addr: fe80::9e8e:99ff:fe21:d8f6/64 Scope:Link
eth3 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F7
inet6 addr: fe80::9e8e:99ff:fe21:d8f7/64 Scope:Link
只有第三张网卡上接了网线,也就是eth2,但是eth2上明显是私有地址,但是那根网线是接在交换机上的,我该怎么解决外部无法访问的问题?
inet6 addr: fe80::9e8e:99ff:fe21:d8f4/64 Scope:Link
eth1 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F5
inet6 addr: 2001:da8:c000:100:9e8e:99ff:fe21:d8f5/64 Scope:Global
inet6 addr: fe80::9e8e:99ff:fe21:d8f5/64 Scope:Link
eth2 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F6
inet addr:192.168.100.128 Bcast:192.168.100.255 Mask:255.255.255.0
inet6 addr: 2001:da8:c000:100:9e8e:99ff:fe21:d8f6/64 Scope:Global
inet6 addr: fe80::9e8e:99ff:fe21:d8f6/64 Scope:Link
eth3 Link encap:Ethernet HWaddr 9C:8E:99:21:D8:F7
inet6 addr: fe80::9e8e:99ff:fe21:d8f7/64 Scope:Link
只有第三张网卡上接了网线,也就是eth2,但是eth2上明显是私有地址,但是那根网线是接在交换机上的,我该怎么解决外部无法访问的问题?
|
首先申请一个公网地址,然后给eth2配上,或者让eth2的BOOTPROTO=dhcp
都是修改 /etc/sysconfig/network-scripts/ifcfg-eth0
都是修改 /etc/sysconfig/network-scripts/ifcfg-eth0