| #! /bin/sh |
| |
| if [ "$3" = link ]; then |
| cat << EOF |
| 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
| 2: craft0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 532\ link/ether f4:f5:e8:01:a1:01 brd ff:ff:ff:ff:ff:ff |
| 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP qlen 532\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff |
| 4: eth1.inband@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff\ vlan id 4090 <REORDER_HDR> |
| 5: eth1.peer@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff\ vlan id 2000 <REORDER_HDR> |
| 6: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff\ bridge |
| EOF |
| |
| else |
| cat << EOF |
| 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN \ link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 |
| 1: lo inet 127.0.0.1/32 scope host lo\ valid_lft forever preferred_lft forever |
| 1: lo inet 127.0.0.1/8 scope host lo\ valid_lft forever preferred_lft forever |
| 1: lo inet6 ::1/128 scope host \ valid_lft forever preferred_lft forever |
| 2: craft0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 532\ link/ether f4:f5:e8:01:a1:01 brd ff:ff:ff:ff:ff:ff |
| 2: craft0 inet 192.168.5.99/24 scope global craft0\ valid_lft forever preferred_lft forever |
| 2: craft0 inet6 fe80::f6f5:e8ff:fe01:a101/64 scope link \ valid_lft forever preferred_lft forever |
| 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master br0 state UP qlen 532\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff |
| 3: eth1 inet6 fe80::f6f5:e8ff:fe01:a102/64 scope link \ valid_lft forever preferred_lft forever |
| 4: eth1.inband@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff |
| 4: eth1.inband inet6 fe80::f6f5:e8ff:fe01:a102/64 scope link \ valid_lft forever preferred_lft forever |
| 5: eth1.peer@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff |
| 5: eth1.peer inet 192.168.2.1/24 scope global eth1.peer\ valid_lft forever preferred_lft forever |
| 5: eth1.peer inet6 fe80::f6f5:e8ff:fe01:a102/64 scope link \ valid_lft forever preferred_lft forever |
| 6: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP qlen 1000\ link/ether f4:f5:e8:01:a1:02 brd ff:ff:ff:ff:ff:ff |
| 6: br0 inet 192.168.1.147/24 brd 192.168.1.255 scope global br0\ valid_lft forever preferred_lft forever |
| 6: br0 inet6 2605:a601:b17:d600:f6f5:e8ff:fe01:a102/64 scope global dynamic \ valid_lft 3595sec preferred_lft 3595sec |
| 6: br0 inet6 fe80::f6f5:e8ff:fe01:a102/64 scope link \ valid_lft forever preferred_lft forever |
| EOF |
| |
| fi |