Most of the networkConfiguration is kept in files; therefore, adjusting these settings is simple.
To start, you can use three management commands:
When you’re working with network interfaces, there are two additional files you need to know:
ifconfig Displays the IP address and other interface-related information
route Enables you to view or change the routing information on the system
system-config-network Provides a menu-driven utility for network configuration tui
/etc/sysconfig/network This file contains gateway and hostname information.
/etc/sysconfig/network-scripts This directory contains all the interface config files for your system.
# cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=RHEL01
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=dhcp
HWADDR=08:00:27:30:74:AA
ONBOOT=yes
DHCP_HOSTNAME=RHEL01
TYPE=Ethernet
Interface details can be edited:
Step 1. To bring the single interface down, use ifdown:
# ifdown eth1
Step 2. To restore the interface that you just brought down, use ifup:
# ifup eth1
Use the ifconfig command to display your current IP address
Syntax: ifconfig [options] [interface]
Options:
netmask MASK Specifies the netmask for the interface
hw ADDRESS Sets the MAC address of the interface
up Brings up the interface
down Bring down the interface
Shutting down interface eth0: [ OK ]
Shutting down interface eth1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0:
Determining IP information for eth0... done. [ OK ]
Bringing up interface eth1: [ OK ]
No comments:
Post a Comment