Archive for July, 2008

Sub interfaces in Linux

Tuesday, July 15th, 2008

A friend at work showed me this:

You can add additional IP addresses to your interface.

edit /etc/sysconfig/network-scripts/ifcfg-eth0:1

My origonal nic is eth0, subinterface is eth0:1

DEVICE=eth0:1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.1.2
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
NETWORK=192.168.1.0
HWADDR=00:15:58:73:d8:a9

Then bring up the new interface.

Change MAC address

Tuesday, July 15th, 2008

A friend at work showed me this trick.  It’s usefull if you change network cards and need your old MAC address.

ifconfig eth0 hw ether 00:00:00:00:00:00