Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Oct 2008
ds marking is not working using tc command
We are developing a new router. It has 2 ethernet ports(1 for LAN and 1 for WAN connection). It runs Linux Kernel 2.4.18 as operating system.
We are implementing diff service making using using tc command. But we are facing problem while marking required packets which is explained below with an example.
Setup: Router is having following setup
Router LAN IP: 192.168.1.156
Router WAN 1 IP: 220.127.116.11
Setup: Router is connected with 2 PCs. One PC is connected to LAN side another to WAN side of ICM. Both PC are booted with LINUX os (cent os)
LAN side PC ip: 192.168.1.18
WAN side PC ip: 18.104.22.168
Rule applied :
1. All packets with destination ip 192.168.1.18 should mark with dscp value 0x17.
2. All packets with destination ip 22.214.171.124 should mark with dscp value 0x21.
Tc commands used to add rules:
tc qdisc add dev eth0 root handle 1: dsmark indices 16 default_index 15 set_tc_index
tc qdisc add dev waneth0 root handle 2: dsmark indices 16 default_index 15 set_tc_index
tc class change dev eth0 classid 1:1 dsmark mask 0x0 value 0x17
tc class change dev eth0 classid 2:1 dsmark mask 0x0 value 0x21
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip dst 192.168.1.18 flowid 1:1
tc filter add dev eth0 parent 2:0 protocol ip prio 1 u32 match ip dst 126.96.36.199 flowid 1:1
Router web pages are viewed through LAN side PC. In LAN side PC it is observed that all packets reaching from 192.168.1.156 contains TOS field value 0x17.
Router web pages are viewed through WAN side PC. In WAN side PC it is observed that all packets reaching from 188.8.131.52 contains TOS field value 0x21.
WAN side PC web pages are viewed through LAN side PC through router. In LAN side PC it is observed that all packets reaching from 184.108.40.206 does not contains TOS field value as 0x17.
Can any one help us to solve this problem? Is any command is to be added to enable ds marking for routing packets?
Thanks in advance.