Tools
The simplest way to manage network settings is to use the system-config-network tool or the non-graphical variant system-config-network-tui
To start, stop, status all our network devices
$ service network [start|stop|status|restart]
Other useful tools are:
ifconfig | Display our network settings. |
ping | Used for check network connectivity |
route -n | Display routing and Gateway |
traceroute | Display network routing to a host. |
netstat -nr | Display open ports. |
Configuration
Main network configuration file is /etc/sysconfig/network-scripts/ifcfg-<name>.
Hostname
$ hostname
tester1.example.com
Routing
Local routing for e.g. localhost, but also for static routing.
$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
Main routing configuration file. Any changes will be overwritten, unless disabled in above sysconfig network-scripts with PEERDNS=no.
$ cat /etc/resolv.conf
$ Generated by NetworkManager
search example.com
nameserver 192.168.1.1
Reference
- network-scripts: /usr/share/doc/initscripts-<version>/sysconfig.txt
No comments:
Post a Comment