![]() To delete an IP on an interface: ~]# ip address del 192.168.1.254/24 dev enps03Īlter the status of the interface by bringing the interface eth0 online: ~]# ip link set eth0 upĪlter the status of the interface by bringing the interface eth0 offline: ~]# ip link set eth0 downĪlter the status of the interface by changing the MTU of eth0: ~]# ip link set ethĪlter the status of the interface by enabling promiscuous mode for eth0: ~]# ip link set eth0 promisc onĪdd a default route (for all addresses) via the local gateway 192.168.1.254 that can be reached on device eth0: ~]# ip route add default via 192.168.1.254 dev eth0Īdd a route to 192.168.1.0/24 via the gateway at 192.168.1.254: ~]# ip route add 192.168.1.0/24 via 192.168.1.254Īdd a route to 192.168.1.0/24 that can be reached on device eth0: ~]# ip route add 192.168.1.0/24 dev eth0ĭelete the route for 192.168.1.0/24 via the gateway at 192.168.1.254: ~]# ip route delete 192.168.1.0/24 via 192.168.1.254ĭisplay the route taken for IP 10.10.1.4: ~]# ip route get 10.10.1.4 ifconfig To assign an IP to an interface, for example, enps03: ~]# ip address add 192.168.1.254/24 dev enps03 To show the IP addresses assigned to an interface on your server: ~]# ip address show Here are some common use cases for the ip command. vrf - manage virtual routing and forwarding devices.The OBJECT is the most important part of the synopsis, and the following are supported (some omitted for brevity):Īddress - protocol (IPv4 or IPv6) address on a device. The ip command can show address information, manipulate routing, plus display network various devices, interfaces, and tunnels. The ip command is one of the basic commands every administrator will need in daily work, from setting up new systems and assigning IPs to troubleshooting existing systems. ![]()
0 Comments
Leave a Reply. |