#### Switching
Switching helps to connect the interface within same network.
To see the interfaces on the hosts use ip link
command
[~]$ ip link
eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode
DEFAULT group default qlen 1000
ip addr add
command [~]$ ip addr add 192.168.1.10/24 dev eth0
#### Routing
Router helps to connect to two seprate networks together.
To see the existing routing table configuration run the route
command.
[~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
[~]$ ip route add 192.168.2.0/24 via 192.168.1.1
[~]$ route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 192.168.1.1 255.255.255.0 UG 0 0 0 eth0
[~]$ ip addr
[~]$ ip route
/etc/network/interfaces
file.