我有一台带有两个以太网端口eth0和eth1的机器。 目前只有eth0配置了public static ip。根据服务器提供商eth1连接到交换机,我可以在其上使用内部ips,流量不会与您的带宽相反。 立即设置:
eth0 Link encap:Ethernet HWaddr AA:AA:AA:AA:AA:AA
inet addr:BBBB.BBBB.BBBB.BBBB Bcast:BBBB.BBBB.BBBB.CCCC Mask:255.255.255.248
inet6 addr: *::*:*:*:*/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:526708 errors:0 dropped:0 overruns:0 frame:0
TX packets:523101 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:65971510 (62.9 MiB) TX bytes:76797538 (73.2 MiB)
Memory:fb120000-fb13ffff
eth1 Link encap:Ethernet HWaddr *:*:*:*:*:*
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Memory:fb100000-fb11ffff
使用ip addr show
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether *:*:*:*:*:* brd ff:ff:ff:ff:ff:ff
inet DDDD.DDDD.DDDD.DDDD/29 brd EE.EE.EE.EEE scope global eth0
inet6 fe80::ec4:7aff:fe76:c638/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN qlen 1000
link/ether vv:vv:vv:vv:vv:vv brd ff:ff:ff:ff:ff:ff
我可以将什么Ip分配给eth1? 如何通过此端口重定向其他类似计算机的流量,并通过eth0重定向其余流量。
(我使用nginx作为负载均衡器)