A manual / automatic configuration parameters ip ifconfig ifup ifdown
1.ifconfig manually modify the startup closed network interface view
ifconfig network interface (such as eth0 eth1, etc.) up | down
Two routers route modification
Route - [no]
-n: Do not use a communication protocol or a host name, directly ip / port number
-ee display more detailed information
Modify the command
route add / del [-net | -host] [network or host name] netmask [mask] [gw | dev]
add / del: add or remove
parameter:
-net represents a route followed by the network
-Host rear contact portion to be connected to a single host router
netmask subnet mask
gw: access gateway behind value ip
Dev specify which network card is connected back to go out with a network interface
E.g
route add default gw 192.168.1.2 --- increase the default router, after setting up, / etc / init.d / network restart
route add/del -net 192.168.100.0 netmask 255.255.255.0 dev eth0
Three-parameter network command ip
ip [options] action command
Options and arguments:
-s Displays statistics for devices
link with the device device-specific configurations like MAC MTU
add/address
route and router settings related
3.1 Data Link Layer interface device associated ip link
ip link show interface displays all the information
ip link set device [parameters]
up | down to open or close an interface
change the configuration of the mac address
name given special names Interface
mtu largest unit
E.g
NIC boot close ip link set eth0 up / down
Value setting unit ip link set eth0 mtu 1000
Modify the name of the NIC mac
ip link set eth0 name bbb
ip link set eth0 address xx:xx:xx:xx:xx:xx
3.2 associated with the network layer related settings ip
ip ip adress show --- View parameters
ip adress add / del [ip parameter] [device name dev] parameters
setting parameters of the network ip ip
Dev Interface network parameters to be set
Related parameters
Setting broadcast address broadcast
label device aliases
3.3 router ip route related settings
ip route show / list --- View router
ip route [add / del] [ip / network number] [via gateway] [dev Device]
ip or Network Number: 192.168.60.0/24 network number or the like or simply ip
via this gateway out
dev connected by which device out
Add Route
ip route add 192.168.10.0/24 via 192.168.5.100 dev eth0 --- ip10.0 ip network segment can be connected to it through 5.100
92.168.5.100 dev default settings via routing ip route add default eth0