User Tools

Site Tools


tech:server:linux:networking-with-linux:networking-with-linux

Networking with Linux

New Generation

On the fly

TODO

sudo ip addr add 172.16.1.5/24 dev eth1
sudo ip route del 0.0.0.0/0
sudo ip route add 0.0.0.0/0 via 172.16.1.5

Link up/down

root@kozue:~# ip link set enp1s0f0 up
root@kozue:~# ip link set enp1s0f0 down

Traditional

On the fly

ifconfig eth0 192.168.0.1 netmask 255.255.255.0 broadcast 192.168.0.255
route add default gw 192.168.0.254 eth0
ifconfig eth1 up 10.0.0.10 netmask 255.255.255.252
route add -net 10.0.0.0/16 gw 10.0.0.9 dev eth1
route add -net 192.168.0.0/29 gw 10.0.0.9 dev eth1
tech/server/linux/networking-with-linux/networking-with-linux.txt · Last modified: 2019/07/19 07:03 by wnoguchi