Skip to content

Commit

Permalink
update tc example
Browse files Browse the repository at this point in the history
  • Loading branch information
shane965 committed Apr 19, 2023
1 parent 54e9570 commit b436e1e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dist/images/vpcnatgateway/nat-gateway.sh
Original file line number Diff line number Diff line change
Expand Up @@ -248,15 +248,15 @@ function delete_tc_filter() {
v4ip=$2
direction=$3

# tc -p -s -d filter show dev net1 parent $qdisc_id prio 1
# output like this:
# filter protocol ip u32 chain 0
# filter protocol ip u32 chain 0 fh 800: ht divisor 1
# filter protocol ip u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 *flowid :1 not_in_hw
# match IP dst x.x.x.1/32
# police 0x1 rate 1Mbit burst 1Mb mtu 2Kb action drop overhead 0b linklayer ethernet
# ref 1 bind 1 installed 392 sec used 392 sec firstused 18818153 sec
# Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
# tc -p -s -d filter show dev net1 parent $qdisc_id
# filter protocol ip pref 10 u32 chain 0
# filter protocol ip pref 10 u32 chain 0 fh 800: ht divisor 1
# filter protocol ip pref 10 u32 chain 0 fh 800::800 order 2048 key ht 800 bkt 0 *flowid :1 not_in_hw
# match IP dst 172.18.11.2/32
# police 0x1 rate 10Mbit burst 10Mb mtu 2Kb action drop overhead 0b linklayer ethernet
# ref 1 bind 1 installed 47118 sec used 47118 sec firstused 18113444 sec

# Sent 0 bytes 0 pkts (dropped 0, overlimits 0)

# get the corresponding filterID by the EIP, and use the filterID to delete the corresponding filtering rule.
ipList=$(tc -p -s -d filter show dev net1 parent $qdisc_id | grep "match IP " | awk '{print $4}')
Expand Down

0 comments on commit b436e1e

Please sign in to comment.