-
TRex act as both client and server side
-
TRex port mac addrees should configure correctly, so packet generated from port 1 will get to 2 and vice-versa
-
To use the config file you can add this switch
--cfg [file]
-
Or edit the configuration file in
/etc/trex_cfg.yaml
- port_limit : 2
port_info : # set eh mac addr
- dest_mac : [0x1,0x0,0x0,0x1,0x0,0x00] (1)
src_mac : [0x2,0x0,0x0,0x2,0x0,0x00] (2)
- dest_mac : [0x3,0x0,0x0,0x3,0x0,0x00] (3)
src_mac : [0x4,0x0,0x0,0x4,0x0,0x00] (4)
-
Correspond to TRex port 0 - should be Router TenG 0/0/0 mac-address
-
Should be distinc mac-addrees, router should be configure to sent to this mac-addrees
-
Correspond to TRex port 0 - should be Router TenG 0/0/1 mac-address
-
Should be distinc mac-addrees, router should be configure to sent to this mac-addrees
-
Router moves packets from port 0→1 and 1→0 without looking into IP addrees.
-
TenG 0/0/0 <→ TenG 0/0/1
- Router configuration:
interface TenGigabitEthernet0/0/0 mac-address 0100.0001.0000 (1) mtu 4000 (2) ip address 11.11.11.11 255.255.255.0 (3) ip policy route-map p1_to_p2 (4) load-interval 30 ! interface TenGigabitEthernet0/0/1 mac-address 0300.0003.0000 (5) mtu 4000 ip address 12.11.11.11 255.255.255.0 ip policy route-map p2_to_p1 load-interval 30 !
-
Configure mac-addrees to match TRex destination port-0
-
Set MTU
-
Set an ip addrees ( routing can’t work without this)
-
Configure PBR policy - see next slide
-
Configure mac-addrees to match TRex destination port-1
route-map p1_to_p2 permit 10
set ip next-hop 12.11.11.12 (1)
!
route-map p2_to_p1 permit 10
set ip next-hop 11.11.11.12 (2)
-
Set the destination packet to be 12.11.11.12 which correspond to TenG 0/0/1
-
Set the destination packet to be 11.11.11.12 which correspond to TenG 0/0/0
-
What about destination mac-address it should be TRex source mac-addrees?
-
The folowing configuration addrees it
arp 11.11.11.12 0200.0002.0000 ARPA (1)
arp 12.11.11.12 0400.0004.0000 ARPA (2)
-
Destination mac-addrees of packets sent from If 0/0/0 is matched to TRex source mac-address port-0
-
Destination mac-addrees of packets sent from If 0/0/1 is matched to TRex source mac-address port-1
-
You can set static range of IPs for client and server side
generator :
distribution : "seq"
clients_start : "16.0.0.1"
clients_end : "16.0.0.255"
servers_start : "48.0.0.1"
servers_end : "48.0.0.240"
dual_port_mask : "1.0.0.0"
tcp_aging : 0
udp_aging : 0
-
In this example, you should expect:
-
Number of clients 255
-
Number of servers 240
-
interface TenGigabitEthernet0/0/0
mac-address 0100.0001.0000
mtu 4000
ip address 11.11.11.11 255.255.255.0
!
`
interface TenGigabitEthernet0/0/1
mac-address 0300.0003.0000
mtu 4000
ip address 22.11.11.11 255.255.255.0
!
ip route 16.0.0.0 255.0.0.0 22.11.11.12 (1)
ip route 48.0.0.0 255.0.0.0 11.11.11.12 (2)
-
Match the range of TRex YAML ( client side 0/0/0 )
-
Match the range of TRex YAML ( server side 0/0/1)
-
To verify that TRex port-0 is connected to Router 0/0/0 and not 0/0/1 run
$./t-rex-64 -f cap2/dns.yaml -m 1 -d 100 -l 1000 --lo --lm 1
-
It sends packets only from TRex port-0 (
--lm 1
) -
to send only from TRex port 1 do this:
$./t-rex-64 -f cap2/dns.yaml -m 1 -d 100 -l 1000 --lo --lm 2
interface TenGigabitEthernet1/0/0
mac-address 0000.0001.0000
mtu 4000
ip address 11.11.11.11 255.255.255.0
ip policy route-map p1_to_p2
load-interval 30
ipv6 enable #(1)
ipv6 address 2001:DB8:1111:2222::1/64 #(2)
ipv6 policy route-map ipv6_p1_to_p2 #(3)
!
ipv6 unicast-routing #(4)
ipv6 neighbor 3001::2 TenGigabitEthernet0/1/0 0000.0002.0002 #(5)
ipv6 neighbor 2001::2 TenGigabitEthernet0/0/0 0000.0003.0002
route-map ipv6_p1_to_p2 permit 10 #(6)
set ipv6 next-hop 2001::2
!
route-map ipv6_p2_to_p1 permit 10
set ipv6 next-hop 3001::2
!
csi-mcp-asr1k-40(config)#ipv6 route 4000::/64 2001::2
csi-mcp-asr1k-40(config)#ipv6 route 5000::/64 3001::2
-
Enable ipv6
-
Add ipv6 addrees
-
Add pbr
-
Enable ipv6 routing
-
Mac-addr setting should be like T-Rex
-
PBR configuraion