Skip to content

Instantly share code, notes, and snippets.

@alagalah
Created June 12, 2015 04:59
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save alagalah/ffdd3b3053d3bb6e6bf1 to your computer and use it in GitHub Desktop.
10.0.35.2 is a GBP client
10.0.36.2 is a GBP web server
Chain is 2 x SFF, 2 x SF
"name": "http-chain-rule",
"classifier-ref": [
{
"name": "http-dest",
"direction": "in"
}
],
"action-ref": [
{
"name": "chain1",
"order": 0
}
]
},
{
"name": "http-out-rule",
"classifier-ref": [
{
"name": "http-src",
"direction": "out"
}
],
"action-ref": [
{
"name": "allow1",
"order": 0
}
]
}
Packet from 10.0.35.2 TO 10.0.36.2 port 80: Add NSH send to chain
recirc_id(0),skb_priority(0),in_port(4),eth(src=00:00:00:00:35:02,dst=88:f0:31:b5:12:b5),eth_type(0x0800),ipv4(src=10.0.35.2,dst=10.0.36.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=60253/0,dst=80/0xffff), packets:3173, bytes:252616, used:0.000s, flags:SFP., actions:set(tunnel(tun_id=0x3,nsp=0x1,nsi=255,nshc1=0xc0a83246,nshc2=0x3,nshc3=0x0,nshc4=0x0,src=0.0.0.0,dst=192.168.50.71,tos=0x0,ttl=64,flags(df,key,nsp,nsi,nshc1,nshc2,nshc3,nshc4))),set(eth(src=88:f0:31:b5:12:b5,dst=00:00:00:00:36:02)),set(ipv4(src=10.0.35.2,dst=10.0.36.2,proto=6,tos=0,ttl=63,frag=no)),2
Packet comes back from chain
recirc_id(0),skb_priority(0),tunnel(tun_id=0x3/0xffffffffffffffff,nsp=0x1/0,nsi=253/0,nshc1=0xc0a83246/0,nshc2=0x3/0,nshc3=0/0,nshc4=0/0,src=192.168.50.73/255.255.255.255,dst=192.168.50.70/255.255.255.255,tos=0/0xff,ttl=64/0xff,flags(key,nsp,nsi,nshc1,nshc2,nshc3,nshc4)),in_port(2),skb_mark(0),eth(src=88:f0:31:b5:12:b5,dst=00:00:00:00:36:02),eth_type(0x0800),ipv4(src=10.0.35.2,dst=10.0.36.2,proto=6,tos=0,ttl=63,frag=no), packets:3173, bytes:252616, used:0.000s, flags:SFP., actions:set(ipv4(src=10.0.35.2,dst=10.0.36.2,proto=6,tos=0,ttl=62,frag=no)),6
Webserver sends packet back to client directly:
recirc_id(0),skb_priority(0),in_port(6),eth(src=00:00:00:00:36:02,dst=88:f0:31:b5:12:b5),eth_type(0x0800),ipv4(src=10.0.36.2,dst=10.0.35.2,proto=6,tos=0,ttl=64,frag=no),tcp(src=80/0xffff,dst=60253/0), packets:2645, bytes:758074, used:0.000s, flags:SFP., actions:set(eth(src=88:f0:31:b5:12:b5,dst=00:00:00:00:35:02)),set(ipv4(src=10.0.36.2,dst=10.0.35.2,proto=6,tos=0,ttl=63,frag=no)),4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment