Skip to content

Instantly share code, notes, and snippets.

@vv111y
Last active January 16, 2024 10:50
Show Gist options
  • Save vv111y/662cf142a9a23e0debae79ae832a5184 to your computer and use it in GitHub Desktop.
Save vv111y/662cf142a9a23e0debae79ae832a5184 to your computer and use it in GitHub Desktop.
diagnostics for centos6 dual port network - traffic failure between ports
UPDATE: modified for nics configured for different subnets
things I would check:
- ip's should be on same subnet
- correct subnet mask
- gateway only on internet facing port
- check routing table for erroneous static routes
- make sure IP forwarding enabled for local port
- make sure duplex settings the same (set both to 'auto')
- same MTU size if specified
- make sure firewall iptables are not blocking
- check make sure interfaces are up and running by default
- check BOOTPROTO=static for both
- other less likely:
- hostname issues
- make sure any residual configs are removed
- wrong interface naming convention (that sounds unlikely to me)
sample configs:
/etc/sysconfig/network-scripts/ifcfg-eth0:
```
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=x.x.1.x
NETMASK=255.255.255.0
# GATEWAY= host address for this subnet
```
/etc/sysconfig/network-scripts/ifcfg-eth1:
```
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
IPADDR=x.x.50.x
NETMASK=255.255.255.0
# GATEWAY= host address for this subnet
```
/etc/sysctl.conf
```
# include this line for ip forwarding, simple routing
net.ipv4.ip_forward = 1
```
run: sysctl -p
update iptables:
iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
service iptables save
RUN:
service network restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment