Network Configuration

From SlackWiki
Jump to: navigation, search

Contents

See Your Current Network Configuration

  ifconfig
  /sbin/ifconfig (if you are not root)


Network Reconfiguration - Temporary Changes

ifconfig is the command to make changes to your networking.

    ifconfig (shows the current interface configuration)
    
    ifconfig eth0 up (brings eth0 interface up)
    
    ifconfig eth1 down (takes eth1 interface down)
    
    ifconfig eth0 192.168.1.5 netmask 255.255.255.0 up (brings eth0 up with an IP of 192.168.1.5)
    
    ifconfig eth0:1 192.168.2.15 netmask 255.255.255.0 (adds a secondary IP address of 192.168.2.15 to eth0)


Network Reconfiguration - Permanent Changes

ETH0
If you need to change your eth0 configuration after an install, use netconfig

    netconfig

OTHER INTERFACES
To reconfigure other network devices, you need to edit the /etc/rc.d/rc.inet1.conf files by hand. The file is very easy to figure out.

    vi /etc/rc.d/rc.inet1.conf


Make changes take effect immediately

To make the network changes immediately active:

    /etc/rc.d/rc.inet1 restart  (restarts all interfaces)
    /etc/rc.d/rc.inet1 eth0_restart  (restarts eth0)
    /etc/rc.d/rc.inet1 eth1_restart  (restarts eth1)
    ...etc...
Personal tools