I have 3 nics in a NATed gateway file server. Two nics (eth1, eth2) provide dhcp and nfs services to an internal subnet via a dedicated switch. The other nic (eth0) connects to an external WAN switch to provide net access to the systems in the subnet.
--- eth1 WAN switch eth0 --- | SUBNET switch --- eth2
Question: Is it possible to disable the NATing, nfs, dhcp and just somehow bridge the external WAN nic to the internal ones such that it's just a pass through? Basically having the server behave like a switch? Allowing the internal systems to join the network on the WAN. I know how to disable NAT, nfs and dhcp but not how to configure the nics.
I know I could simply unplug eth1, eth2 from the server and plug them into the WAN switch but my goal is to script this so I don't have to physically plug and unplug network cables each time.
Thanks
2010/6/15 Robert Arkiletian robark@gmail.com:
I have 3 nics in a NATed gateway file server. Two nics (eth1, eth2) provide dhcp and nfs services to an internal subnet via a dedicated switch. The other nic (eth0) connects to an external WAN switch to provide net access to the systems in the subnet.
--- eth1 WAN switch eth0 --- | SUBNET switch --- eth2
Question: Is it possible to disable the NATing, nfs, dhcp and just somehow bridge the external WAN nic to the internal ones such that it's just a pass through? Basically having the server behave like a switch? Allowing the internal systems to join the network on the WAN. I know how to disable NAT, nfs and dhcp but not how to configure the nics.
I know I could simply unplug eth1, eth2 from the server and plug them into the WAN switch but my goal is to script this so I don't have to physically plug and unplug network cables each time.
Just create network bridge: http://www.cyberciti.biz/faq/rhel-linux-kvm-virtualization-bridged-networkin...
-- Eero
On Monday, June 14, 2010, Robert Arkiletian robark@gmail.com wrote:
I have 3 nics in a NATed gateway file server. Two nics (eth1, eth2) Is it possible to disable the NATing, nfs, dhcp and just somehow bridge the external WAN nic to the internal ones such that it's just a pass through? Basically having the server behave like a switch? Allowing the internal systems to join the network on the WAN. I know how to disable NAT, nfs and dhcp but not how to configure the nics.
You do this by creating a bridge.
The Red Hat/CentOS way is to create emptyish interface files like:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none BRIDGE=br0 ONBOOT=YES
# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none BRIDGE=br0 ONBOOT=YES
And then a bridge interface file:
# cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge ONBOOT=yes STP=on IPADDR=system.ip.address.here NETMASK=your.dotted.quad.mask
Obviously, adjust as needed to match your actual hardware, etc.
This can of course also be scripted using the actual networking commands, that I don't recall offhand.
On Mon, Jun 14, 2010 at 4:13 PM, Alan Hodgson ahodgson@simkin.ca wrote:
On Monday, June 14, 2010, Robert Arkiletian robark@gmail.com wrote:
I have 3 nics in a NATed gateway file server. Two nics (eth1, eth2) Is it possible to disable the NATing, nfs, dhcp and just somehow bridge the external WAN nic to the internal ones such that it's just a pass through? Basically having the server behave like a switch? Allowing the internal systems to join the network on the WAN. I know how to disable NAT, nfs and dhcp but not how to configure the nics.
You do this by creating a bridge.
The Red Hat/CentOS way is to create emptyish interface files like:
# cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 BOOTPROTO=none BRIDGE=br0 ONBOOT=YES
# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none BRIDGE=br0 ONBOOT=YES
And then a bridge interface file:
# cat /etc/sysconfig/network-scripts/ifcfg-br0 DEVICE=br0 TYPE=Bridge ONBOOT=yes STP=on IPADDR=system.ip.address.here NETMASK=your.dotted.quad.mask
Obviously, adjust as needed to match your actual hardware, etc.
This can of course also be scripted using the actual networking commands, that I don't recall offhand.
Ah, Thanks Alan. I can write the script from this point. :-)