Forum Discussion
5 Replies
- Leonardo_SouzaCirrocumulus
Depends with protocol you want to add the information. HTTP is easy, as you can add custom headers like is common done to add the source IP.
 
HTTP::header insert X-Forwarded-For [IP::remote_addr]
 
https://clouddocs.f5.com/api/irules/http__header.html
 
For UDP or TCP read this question/answers:
 
https://devcentral.f5.com/s/feed/0D51T00006i7elUSAQ
 
- faizan123_23330Nimbostratus
this is for the remote ip address. Can we add the remote mac-address field in the F5 header?
- Leonardo_SouzaCirrocumulus
What do you mean by F5 header?
- Leonardo_Accor1Nimbostratus
Depending on network design may be that F5 can't know the remote MAC ADDRESS, because MAC is related to LAYER 2. ES: If the F5 and remote host are on different VLANS, F5 can't know remote MAC address. Moreover i guess that don't exist a iRule command to catch remote MAC ADDRESS, so you would create a separate script (es iCall script) to enetually catch this information. I guess is a great effort.
Leonardo
- JinshuCirrus
You can insert the mac address of 'last-hop' and 'next-hop' using the LINK command.
Please read below wiki for more details.
https://devcentral.f5.com/wiki/iRules.LINK.ashx
-Jinshu