Linux NIC Configuration: Difference between revisions
(Created page with "== Debian Static == * Login as root through the console * Verify that your interface is static more /etc/networks/interfaces If the iface eth0 says iface eth0 init dhcp, con...") |
No edit summary |
||
Line 1: | Line 1: | ||
[[Category:Linux]] | |||
== Debian Static == | == Debian Static == | ||
* Login as root through the console | * Login as root through the console | ||
Line 50: | Line 51: | ||
USERCONTROL='no' | USERCONTROL='no' | ||
EONIC</pre> | EONIC</pre> | ||
Revision as of 23:05, 17 March 2015
Debian Static
- Login as root through the console
- Verify that your interface is static
more /etc/networks/interfaces
If the iface eth0 says iface eth0 init dhcp, configure it for static
- edit /etc/networks/interfaces with your favorite editor
- change iface eth0 init dhcp to (change the information for your network)
iface eth0 inet static address 192.168.1.10 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255 gateway 192.168.1.1
- Exit and save
NIC Scripts
The NIC scripts are provided to make configuring NICs easier. You will basically edit the script and paste it into the terminal. You want to use Putty or SecureCRT as you cannot paste into the VM console.
If you are using a Lab Image, then eth0 is already configured for you and you do not need to configure it. Eth0 is for management purposes only.
SLES Static Script
You will need to change the ifcfg-ethX to your NIC number. The NIC number is determined by the order that the kernel modules are probed as well as the bus order.
Example of the NIC number:
cat > /etc/sysconfig/network/ifcfg-eth1 <<EONIC
You will need to change the NAME and IPADDR.
NAME Example:
NAME='Lab 1'
IPADDR Example:
IPADDR='10.200.1.105/24'
You may also change the MTU, if its blank it will default to 1500, example:
MTU='9000'
cat > /etc/sysconfig/network/ifcfg-ethX <<EONIC NAME='<Network Name>' BOOTPROTO='static' BROADCAST='' ETHTOOL_OPTIONS='' IPADDR='<IP Address>/<Subnet Bit Count>' MTU='' NETWORK='' REMOTE_IPADDR='' STARTMODE='auto' USERCONTROL='no' EONIC