Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
* [LARTC] urgent help needed in iproute2+tc
@ 2001-04-10 23:23 Ravikanth Samprathi
  2001-04-15 18:18 ` Junus Junarto D
  2001-04-19 23:20 ` Ravikanth Samprathi
  0 siblings, 2 replies; 3+ messages in thread
From: Ravikanth Samprathi @ 2001-04-10 23:23 UTC (permalink / raw)
  To: lartc

Hi all,
I am running linux-2.4.0 with
3 interfaces - eth0, eth1, and eth2.

eth0 is the outgoing WAN interface.
eth1 and eth2 are the internal LAN interfaces.
eth1 and eth2 belong to a bridge group br0.
eth1 is connected to a voice-over-ip phone.
eth2 is connected to a pc.

so, the setup is
                       ------------------------------
	            |                             |
voip-phone --->| eth1  --->               |
	            |	  br0   eth0 -|---WAN
lan-pc ---------->| eth2 ---->               |
                       ------------------------------

voip-phone can talk with lan-pc
through-the-bridge-group.
voip phone can also talk with any other
phone in the outside-world-through-the-WAN.

I need to setup QoS so that all packets
from voip-phone (that is destined to either
eth1, eth2 or to eth0) are provided with
high-priority-low-delay service.  voip-phone
can be on any lan-interface (eth1 or eth2).
The only thing that can be surely said
about the voip-phone is that it will
have only a particular set of ip addresses
ranging from 171.72.233.100 to 171.72.233.200.

To implement this, i downloaded the
iproute2+tc tool version
iproute2-2.2.4-now-ss991023.tar.gz
and went through the README files.

Can somebody please help me in
writing the commands?  That will
be of great help.

Thanking you in advance,
ravi


--------------------------------------------------->
Ravi Samprathi   work:(408)853-8038
Cisco Systems   res  :(408)988-2268
Empowering the  Internet Generation
<---------------------------------------------------



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] urgent help needed in iproute2+tc
  2001-04-10 23:23 [LARTC] urgent help needed in iproute2+tc Ravikanth Samprathi
@ 2001-04-15 18:18 ` Junus Junarto D
  2001-04-19 23:20 ` Ravikanth Samprathi
  1 sibling, 0 replies; 3+ messages in thread
From: Junus Junarto D @ 2001-04-15 18:18 UTC (permalink / raw)
  To: lartc

Hi Ravi,

First you must know what port is used on voip.
To check the correct port of voip, you can use Etherreal, tcpdump or
Sniffer.
I guess it is the same as H.323 on MS NetMeeting used with UDP port 1720.
Port 1720 = 0x06B8.

In here we use priority and simple FIFO queuing. Both queuing are used in
ordinary Cisco Routers.
Below is the commands:

------------------------------
###### To control eth0 ######
#Create Priority queuing (minimum 3 bands)
tc qdisc add dev eth0 root handle 1: prio bands 3 priomap 0 1 2

#Create FIFO queuing and attach to priority queuing
tc qdisc add dev eth0 parent 1:1 handle 2: pfifo limit 1024
tc qdisc add dev eth0 parent 1:2 handle 3: pfifo limit 1024
tc qdisc add dev eth0 parent 1:3 handle 4: pfifo limit 1024

#Installing a u32 classifier for the traffic
#In Cisco router 'tc filter' command has same function as access-list
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 divisor 1

# Filter UDP traffic which has destination port 1720 (0x06B8) and direct
#   this traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth0 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
flowid 1:1
# Filter UDP traffic which has source port 1720 (0x06B8) and direct this
#   traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth0 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
flowid 1:1

###### To control eth1 ######
#Create Priority queuing (minimum 3 bands)
tc qdisc add dev eth1 root handle 1: prio bands 3 priomap 0 1 2

#Create FIFO queuing and attach to priority queuing
tc qdisc add dev eth1 parent 1:1 handle 2: pfifo limit 1024
tc qdisc add dev eth1 parent 1:2 handle 3: pfifo limit 1024
tc qdisc add dev eth1 parent 1:3 handle 4: pfifo limit 1024

#Installing a u32 classifier for the traffic
#In Cisco router 'tc filter' command has same function as access-list
tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 divisor 1

# Filter UDP traffic which has destination port 1720 (0x06B8) and direct
#   this traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth1 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
flowid 1:1
# Filter UDP traffic which has source port 1720 (0x06B8) and direct this
#   traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth1 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
flowid 1:1

###### To control eth2 ######
#Create Priority queuing (minimum 3 bands)
tc qdisc add dev eth2 root handle 1: prio bands 3 priomap 0 1 2

#Create FIFO queuing and attach to priority queuing
tc qdisc add dev eth2 parent 1:1 handle 2: pfifo limit 1024
tc qdisc add dev eth2 parent 1:2 handle 3: pfifo limit 1024
tc qdisc add dev eth2 parent 1:3 handle 4: pfifo limit 1024

#Installing a u32 classifier for the traffic
#In Cisco router 'tc filter' command has same function as access-list
tc filter add dev eth2 parent 1:0 protocol ip prio 1 u32 divisor 1

# Filter UDP traffic which has destination port 1720 (0x06B8) and direct
#   this traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth2 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
flowid 1:1
# Filter UDP traffic which has source port 1720 (0x06B8) and direct this
#   traffic to class 1:1 (FIFO priority 1)
tc filter add dev eth2 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
flowid 1:1
------------------------------


I haven't tried it before. Let me know it can work or not.

Regards,

> Date: Tue, 10 Apr 2001 16:23:43 -0700
> To: lartc@mailman.ds9a.nl
> From: Ravikanth Samprathi <rsamprat@cisco.com>
> Subject: [LARTC] urgent help needed in iproute2+tc
>
> Hi all,
> I am running linux-2.4.0 with
> 3 interfaces - eth0, eth1, and eth2.
>
> eth0 is the outgoing WAN interface.
> eth1 and eth2 are the internal LAN interfaces.
> eth1 and eth2 belong to a bridge group br0.
> eth1 is connected to a voice-over-ip phone.
> eth2 is connected to a pc.
>
> so, the setup is
                        ------------------------------
                        |                            |
         voip-phone --->| eth1  --->                 |
                        |   br0                eth0 -|---WAN
      lan-pc ---------->| eth2 ---->                 |
                        ------------------------------
>
> voip-phone can talk with lan-pc
> through-the-bridge-group.
> voip phone can also talk with any other
> phone in the outside-world-through-the-WAN.
>
> I need to setup QoS so that all packets
> from voip-phone (that is destined to either
> eth1, eth2 or to eth0) are provided with
> high-priority-low-delay service.  voip-phone
> can be on any lan-interface (eth1 or eth2).
> The only thing that can be surely said
> about the voip-phone is that it will
> have only a particular set of ip addresses
> ranging from 171.72.233.100 to 171.72.233.200.
>
> To implement this, i downloaded the
> iproute2+tc tool version
> iproute2-2.2.4-now-ss991023.tar.gz
> and went through the README files.
>
> Can somebody please help me in
> writing the commands?  That will
> be of great help.
>
> Thanking you in advance,
> ravi
>
>
> --------------------------------------------------->
> Ravi Samprathi   work:(408)853-8038
> Cisco Systems   res  :(408)988-2268
> Empowering the  Internet Generation
> <---------------------------------------------------
>
>
>
>






_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [LARTC] urgent help needed in iproute2+tc
  2001-04-10 23:23 [LARTC] urgent help needed in iproute2+tc Ravikanth Samprathi
  2001-04-15 18:18 ` Junus Junarto D
@ 2001-04-19 23:20 ` Ravikanth Samprathi
  1 sibling, 0 replies; 3+ messages in thread
From: Ravikanth Samprathi @ 2001-04-19 23:20 UTC (permalink / raw)
  To: lartc

Hi,
One more requirement is the following:-
All the packets from the voip source (with a particular ip address, with a 
particular source, arriving on a particular interface) must have the TOS 
byte changed to the
value 0x06,
can u let me know how to do this please?
Thenx in Advance.
ravi

At 01:18 AM 4/16/2001 +0700, Junus Junarto D wrote:
>Hi Ravi,
>
>First you must know what port is used on voip.
>To check the correct port of voip, you can use Etherreal, tcpdump or
>Sniffer.
>I guess it is the same as H.323 on MS NetMeeting used with UDP port 1720.
>Port 1720 = 0x06B8.
>
>In here we use priority and simple FIFO queuing. Both queuing are used in
>ordinary Cisco Routers.
>Below is the commands:
>
>------------------------------
>###### To control eth0 ######
>#Create Priority queuing (minimum 3 bands)
>tc qdisc add dev eth0 root handle 1: prio bands 3 priomap 0 1 2
>
>#Create FIFO queuing and attach to priority queuing
>tc qdisc add dev eth0 parent 1:1 handle 2: pfifo limit 1024
>tc qdisc add dev eth0 parent 1:2 handle 3: pfifo limit 1024
>tc qdisc add dev eth0 parent 1:3 handle 4: pfifo limit 1024
>
>#Installing a u32 classifier for the traffic
>#In Cisco router 'tc filter' command has same function as access-list
>tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 divisor 1
>
># Filter UDP traffic which has destination port 1720 (0x06B8) and direct
>#   this traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth0 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
>flowid 1:1
># Filter UDP traffic which has source port 1720 (0x06B8) and direct this
>#   traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth0 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
>flowid 1:1
>
>###### To control eth1 ######
>#Create Priority queuing (minimum 3 bands)
>tc qdisc add dev eth1 root handle 1: prio bands 3 priomap 0 1 2
>
>#Create FIFO queuing and attach to priority queuing
>tc qdisc add dev eth1 parent 1:1 handle 2: pfifo limit 1024
>tc qdisc add dev eth1 parent 1:2 handle 3: pfifo limit 1024
>tc qdisc add dev eth1 parent 1:3 handle 4: pfifo limit 1024
>
>#Installing a u32 classifier for the traffic
>#In Cisco router 'tc filter' command has same function as access-list
>tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 divisor 1
>
># Filter UDP traffic which has destination port 1720 (0x06B8) and direct
>#   this traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth1 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
>flowid 1:1
># Filter UDP traffic which has source port 1720 (0x06B8) and direct this
>#   traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth1 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
>flowid 1:1
>
>###### To control eth2 ######
>#Create Priority queuing (minimum 3 bands)
>tc qdisc add dev eth2 root handle 1: prio bands 3 priomap 0 1 2
>
>#Create FIFO queuing and attach to priority queuing
>tc qdisc add dev eth2 parent 1:1 handle 2: pfifo limit 1024
>tc qdisc add dev eth2 parent 1:2 handle 3: pfifo limit 1024
>tc qdisc add dev eth2 parent 1:3 handle 4: pfifo limit 1024
>
>#Installing a u32 classifier for the traffic
>#In Cisco router 'tc filter' command has same function as access-list
>tc filter add dev eth2 parent 1:0 protocol ip prio 1 u32 divisor 1
>
># Filter UDP traffic which has destination port 1720 (0x06B8) and direct
>#   this traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth2 parent 1:0 prio 1 u32 match udp src 0x06B8 0xffff \
>flowid 1:1
># Filter UDP traffic which has source port 1720 (0x06B8) and direct this
>#   traffic to class 1:1 (FIFO priority 1)
>tc filter add dev eth2 parent 1:0 prio 1 u32 match udp dst 0x06B8 0xffff \
>flowid 1:1
>------------------------------
>
>
>I haven't tried it before. Let me know it can work or not.
>
>Regards,
>
> > Date: Tue, 10 Apr 2001 16:23:43 -0700
> > To: lartc@mailman.ds9a.nl
> > From: Ravikanth Samprathi <rsamprat@cisco.com>
> > Subject: [LARTC] urgent help needed in iproute2+tc
> >
> > Hi all,
> > I am running linux-2.4.0 with
> > 3 interfaces - eth0, eth1, and eth2.
> >
> > eth0 is the outgoing WAN interface.
> > eth1 and eth2 are the internal LAN interfaces.
> > eth1 and eth2 belong to a bridge group br0.
> > eth1 is connected to a voice-over-ip phone.
> > eth2 is connected to a pc.
> >
> > so, the setup is
>                         ------------------------------
>                         |                            |
>          voip-phone --->| eth1  --->                 |
>                         |   br0                eth0 -|---WAN
>       lan-pc ---------->| eth2 ---->                 |
>                         ------------------------------
> >
> > voip-phone can talk with lan-pc
> > through-the-bridge-group.
> > voip phone can also talk with any other
> > phone in the outside-world-through-the-WAN.
> >
> > I need to setup QoS so that all packets
> > from voip-phone (that is destined to either
> > eth1, eth2 or to eth0) are provided with
> > high-priority-low-delay service.  voip-phone
> > can be on any lan-interface (eth1 or eth2).
> > The only thing that can be surely said
> > about the voip-phone is that it will
> > have only a particular set of ip addresses
> > ranging from 171.72.233.100 to 171.72.233.200.
> >
> > To implement this, i downloaded the
> > iproute2+tc tool version
> > iproute2-2.2.4-now-ss991023.tar.gz
> > and went through the README files.
> >
> > Can somebody please help me in
> > writing the commands?  That will
> > be of great help.
> >
> > Thanking you in advance,
> > ravi
> >
> >
> > --------------------------------------------------->
> > Ravi Samprathi   work:(408)853-8038
> > Cisco Systems   res  :(408)988-2268
> > Empowering the  Internet Generation
> > <---------------------------------------------------
> >
> >
> >
> >
>
>
>
>
>
>
>_______________________________________________
>LARTC mailing list / LARTC@mailman.ds9a.nl
>http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: 
>http://ds9a.nl/2.4Routing/

--------------------------------------------------->
Ravi Samprathi   work:(408)853-8038
Cisco Systems   res  :(408)988-2268
Empowering the  Internet Generation
<---------------------------------------------------



_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://ds9a.nl/2.4Routing/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-04-19 23:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-10 23:23 [LARTC] urgent help needed in iproute2+tc Ravikanth Samprathi
2001-04-15 18:18 ` Junus Junarto D
2001-04-19 23:20 ` Ravikanth Samprathi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox