Last active
July 30, 2022 22:19
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@router:~]# ip addr | |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 | |
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 | |
inet 127.0.0.1/8 scope host lo | |
valid_lft forever preferred_lft forever | |
inet6 ::1/128 scope host | |
valid_lft forever preferred_lft forever | |
3: enp4s2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000 | |
link/ether 00:30:48:c5:d2:de brd ff:ff:ff:ff:ff:ff | |
inet6 fe80::230:48ff:fec5:d2de/64 scope link | |
valid_lft forever preferred_lft forever | |
5: wan@enp4s2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 | |
link/ether 00:30:48:c5:d2:de brd ff:ff:ff:ff:ff:ff | |
inet xxxx/20 brd xxxx scope global dynamic noprefixroute wan | |
valid_lft 1129sec preferred_lft 979sec | |
inet6 fe80::230:48ff:fec5:d2de/64 scope link | |
valid_lft forever preferred_lft forever | |
6: iptv@enp4s2f0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 | |
link/ether 00:30:48:c5:d2:de brd ff:ff:ff:ff:ff:ff | |
inet6 fe80::230:48ff:fec5:d2de/64 scope link | |
valid_lft forever preferred_lft forever |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Remove Dead Interfaces | |
ip link show "iptv" >/dev/null 2>&1 && ip link delete "iptv" | |
ip link add link "enp4s2f0" name "iptv" type vlan id "34" | |
# We try to bring up the logical VLAN interface. If the master | |
# interface the logical interface is dependent upon is not up yet we will | |
# fail to immediately bring up the logical interface. The resulting logical | |
# interface will brought up later when the master interface is up. | |
ip link set "iptv" up || true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment