Re: lug-bg: 2 isp-та и 2 локални мрежи на един интерфеис
- Subject: Re: lug-bg: 2 isp-та и 2 локални мрежи на един интерфеис
- From: Dragomir Zhelev <drago@xxxxxxxxxx>
- Date: Thu, 23 Sep 2004 20:50:07 +0300
- Organization: g00NeT
On Thursday 23 September 2004 20:38, Vasil Kolev wrote:
> На чт, 2004-09-23 в 19:23, Vasil Kolev записа:
> > Пример:
> >
> > server:~# ip a
> > 1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
> > link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
> > inet 127.0.0.1/8 scope host lo
> > 2: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
> > link/ether 00:02:b3:ea:14:4f brd ff:ff:ff:ff:ff:ff
> > inet 192.168.255.254/32 brd 192.168.255.255 scope global eth0
> > 3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
> > link/ether 00:02:b3:ea:14:4e brd ff:ff:ff:ff:ff:ff
> > 5: eth0.52: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
> > link/ether 00:02:b3:ea:14:4f brd ff:ff:ff:ff:ff:ff
> > inet 10.0.52.21/24 brd 10.255.255.255 scope global eth0.52
> > 6: eth0.53: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue
> > link/ether 00:02:b3:ea:14:4f brd ff:ff:ff:ff:ff:ff
> > inet 10.0.53.1/24 brd 10.255.255.255 scope global eth0.53
> > inet 10.0.53.16/32 scope global eth0.53
>
> Забравих да спомена, eth0.53 значи 53ти VLAN (802.1q)
Ами тогава още по кратичко:
#!/bin/sh
ip a |grep -A 1 "$1" | grep inet |cut -c 10- |awk '{print $1}'
?
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|