Forum Discussion
Raymond_Feng_97
May 10, 2007Historic F5 Account
can I snat all the outbound traffic to be one special source port?
Hi, All
I need to write one irules . There is one UDP VS 200.1.1.1:5060 to load balance two serverA and ServerB, I need to write one irules , snat serverA and ServerB outgoing traffic to use source IP 200.1.1.1 and source port 5060.
By now, I can use " snat 200.1.1.1" in irules to let outgoing sourceIP to be 200.1.1.1, but I can't set outgoing source port to be just 5060. When the two server both send out udp package using 5060 source port, our LTM will change one to be other source port.
My question is, do we have any solution to let LTM send out traffic using one special port?
Thanks.
Raymond
- Raymond_Feng_97Historic F5 AccountNo solutions? Radware can do these!!! This will cause F5 lose all china mobile SIP application!
- hoolio
Cirrostratus
I've never tried it, but the snat command does take a port argument: - hoolio
Cirrostratus
Actually from re-reading your first post, it sounds like you're already using this option. Is the command working when there is traffic being sent to just one of the two nodes? Is the source port changing when TMM is trying to send packets to both nodes at the same time?when CLIENT_ACCEPTED { snat 192.168.101.41 666 }
15:25:32.645434 802.1Q vlan4093 P0 192.168.101.41.666 > 192.168.101.45.200: udp 17 (DF) 0x0000 0ffd 0800 4500 002d 73b6 4000 ff11 bc61 ....E..-s.@....a 0x0010 c0a8 6529 c0a8 652d 029a 00c8 0019 2306 ..e)..e-....... 0x0020 686f 7374 2031 2c20 636c 6965 6e74 2031 host.1,.client.1 0x0030 0a00 .. 15:25:32.887513 802.1Q vlan4093 P0 192.168.101.41.666 > 192.168.101.45.100: udp 7 (DF) 0x0000 0ffd 0800 4500 0023 73b9 4000 ff11 bc68 ....E..s.@....h 0x0010 c0a8 6529 c0a8 652d 029a 0064 000f ab14 ..e)..e-...d.... 0x0020 686f 7374 2032 0a00 0000 0000 0000 0000 host.2.......... 0x0030 0000 .. 15:25:34.418260 802.1Q vlan4093 P0 192.168.101.41.666 > 192.168.101.45.200: udp 17 (DF) 0x0000 0ffd 0800 4500 002d 73c5 4000 ff11 bc52 ....E..-s.@....R 0x0010 c0a8 6529 c0a8 652d 029a 00c8 0019 2305 ..e)..e-....... 0x0020 686f 7374 2031 2c20 636c 6965 6e74 2032 host.1,.client.2 0x0030 0a00 .. 15:25:34.983116 802.1Q vlan4093 P0 192.168.101.41.666 > 192.168.101.45.100: udp 7 (DF) 0x0000 0ffd 0800 4500 0023 73ca 4000 ff11 bc57 ....E..s.@....W 0x0010 c0a8 6529 c0a8 652d 029a 0064 000f ab14 ..e)..e-...d.... 0x0020 686f 7374 2032 0a00 0000 0000 0000 0000 host.2.......... 0x0030 0000 ..
- Raymond_Feng_97Historic F5 Accounthaha, thanks, by now the testing seems ok , but I need to find some tools to generate continuous packets from 2-3 servers.
- hoolio
Cirrostratus
If you have *nix boxes or hosts with cygwin installed, you can use something like this (where 1.1.1.1 is the VIP and 100 is the port) to send a packet every 5 seconds with a payload indicating the packet is from host 1, client 1. - Raymond_Feng_97Historic F5 Accounthaha, I just use our bigip. Can you help me to write one shell script to generate 1000 udp packets without delay ( 1 second to too slow )
- hoolio
Cirrostratus
This should send 1000 sequential requests without a delay: - Raymond_Feng_97Historic F5 AccountI have done the testing. And got the result below:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects