Sponsored Content
Full Discussion: TTL field???
Top Forums UNIX for Advanced & Expert Users TTL field??? Post 7889 by solvman on Wednesday 3rd of October 2001 12:44:30 AM
Old 10-03-2001
TTL field???

Hi all,

I wonder, how I can change Time To Live field for icmp packet in Redhat 7.1, kernel 2.4.2-2? I looked up in /proc/sys/net/ipv4 and did find this field in there.
There should be a way to change TTL. If it's in header file, in which one?

Thank you all Smilie
 

9 More Discussions You Might Find Interesting

1. IP Networking

TTL for IP addr from DNS through C code

Hi All, I know that getaddrinfo() return the multiple IP addresses (if present) for a hostname. But, I want to know how to get the TTL value for this list from DNS. I want to get this TTL value and cache this IP address list for that much time and then again go for DNS resolution if TTL expires. ... (2 Replies)
Discussion started by: softindia
2 Replies

2. Shell Programming and Scripting

Sort alpha on 1st field, numerical on 2nd field (sci notation)

I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this: abc ||| 5e-05 ||| bla abc ||| 3 ||| ble def ||| 1 ||| abc def ||| 0.2 ||| def As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Discussion started by: FrancoisCN
1 Replies

3. Solaris

Set up TTL on process

Is there a way to setup the TTL (Time To Live) on a process. We have many ssh processes that seem to just stack up. These processes do not need a static connection all the time and it might cause problems on our servers. Does anybody know how to setup the TTL on a process? (10 Replies)
Discussion started by: jastanle84
10 Replies

4. Shell Programming and Scripting

awk, comma as field separator and text inside double quotes as a field.

Hi, all I need to get fields in a line that are separated by commas, some of the fields are enclosed with double quotes, and they are supposed to be treated as a single field even if there are commas inside the quotes. sample input: for this line, 5 fields are supposed to be extracted, they... (8 Replies)
Discussion started by: kevintse
8 Replies

5. Shell Programming and Scripting

AWK: Pattern match between 2 files, then compare a field in file1 as > or < field in file2

First, thanks for the help in previous posts... couldn't have gotten where I am now without it! So here is what I have, I use AWK to match $1 and $2 as 1 string in file1 to $1 and $2 as 1 string in file2. Now I'm wondering if I can extend this AWK command to incorporate the following: If $1... (4 Replies)
Discussion started by: right_coaster
4 Replies

6. Linux

How do I format a Date field of a .CSV file with multiple commas in a string field?

I have a .CSV file (file.csv) whose data are all enclosed in double quotes. Sample format of the file is as below: column1,column2,column3,column4,column5,column6, column7, Column8, Column9, Column10 "12","B000QRIGJ4","4432","string with quotes, and with a comma, and colon: in... (3 Replies)
Discussion started by: dhruuv369
3 Replies

7. Shell Programming and Scripting

Command/script to match a field and print the next field of each line in a file.

Hello, I have a text file in the below format: Source Destination State Lag Status CQA02W2K12pl:D:\CAQA ... (10 Replies)
Discussion started by: pocodot
10 Replies

8. Shell Programming and Scripting

Display combination of 4 field uniqe record and along with concatenate 5th and 6th field.

Table ACN|NAME|CITY|CTY|NO1|NO2 115|AKKK|ASH|IND|10|15 115|AKKK|ASH|IND|20|20 115|AKKK|ASH|IND|30|35 115|AKKK|ASH|IND|30|35 112|ABC|FL|USA|15|15 112|ABC|FL|USA|25|20 112|ABC|FL|USA|25|45 i have written shell script using cut command and awk programming getting error correct it and add... (5 Replies)
Discussion started by: udhal
5 Replies

9. Shell Programming and Scripting

awk to adjust coordinates in field based on sequential numbers in another field

I am trying to output a tab-delimited result that uses the data from a tab-delimited file to combine and subtract specific lines. If $4 matches in each line then the first matching sequential $6 value is added to $2, unless the value is 1, then the original $2 is used (like in the case of line... (3 Replies)
Discussion started by: cmccabe
3 Replies
Flower filter in tc(8)						       Linux						    Flower filter in tc(8)

NAME
flower - flow based traffic control filter SYNOPSIS
tc filter ... flower [ MATCH_LIST ] [ action ACTION_SPEC ] [ classid CLASSID ] [ hw_tc TCID ] MATCH_LIST := [ MATCH_LIST ] MATCH MATCH := { indev ifname | skip_sw | skip_hw | { dst_mac | src_mac } MASKED_LLADDR | vlan_id VID | vlan_prio PRIORITY | vlan_ethtype { ipv4 | ipv6 | ETH_TYPE } | mpls_label LABEL | mpls_tc TC | mpls_bos BOS | mpls_ttl TTL | ip_proto { tcp | udp | sctp | icmp | icmpv6 | IP_PROTO } | ip_tos MASKED_IP_TOS | ip_ttl MASKED_IP_TTL | { dst_ip | src_ip } PREFIX | { dst_port | src_port } port_number } | tcp_flags MASKED_TCP_FLAGS | type MASKED_TYPE | code MASKED_CODE | { arp_tip | arp_sip } IPV4_PREFIX | arp_op { request | reply | OP } | { arp_tha | arp_sha } MASKED_LLADDR | enc_key_id KEY-ID | { enc_dst_ip | enc_src_ip } { ipv4_address | ipv6_address } | enc_dst_port port_number | ip_flags IP_FLAGS DESCRIPTION
The flower filter matches flows to the set of keys specified and assigns an arbitrarily chosen class ID to packets belonging to them. Addi- tionally (or alternatively) an action from the generic action framework may be called. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. classid CLASSID Specify a class to pass matching packets on to. CLASSID is in the form X:Y, while X and Y are interpreted as numbers in hexadecimal format. hw_tc TCID Specify a hardware traffic class to pass matching packets on to. TCID is in the range 0 through 15. indev ifname Match on incoming interface name. Obviously this makes sense only for forwarded flows. ifname is the name of an interface which must exist at the time of tc invocation. skip_sw Do not process filter by software. If hardware has no offload support for this filter, or TC offload is not enabled for the inter- face, operation will fail. skip_hw Do not process filter by hardware. dst_mac MASKED_LLADDR src_mac MASKED_LLADDR Match on source or destination MAC address. A mask may be optionally provided to limit the bits of the address which are matched. A mask is provided by following the address with a slash and then the mask. It may be provided in LLADDR format, in which case it is a bitwise mask, or as a number of high bits to match. If the mask is missing then a match on all bits is assumed. vlan_id VID Match on vlan tag id. VID is an unsigned 12bit value in decimal format. vlan_prio PRIORITY Match on vlan tag priority. PRIORITY is an unsigned 3bit value in decimal format. vlan_ethtype VLAN_ETH_TYPE Match on layer three protocol. VLAN_ETH_TYPE may be either ipv4, ipv6 or an unsigned 16bit value in hexadecimal format. mpls_label LABEL Match the label id in the outermost MPLS label stack entry. LABEL is an unsigned 20 bit value in decimal format. mpls_tc TC Match on the MPLS TC field, which is typically used for packet priority, in the outermost MPLS label stack entry. TC is an unsigned 3 bit value in decimal format. mpls_bos BOS Match on the MPLS Bottom Of Stack field in the outermost MPLS label stack entry. BOS is a 1 bit value in decimal format. mpls_ttl TTL Match on the MPLS Time To Live field in the outermost MPLS label stack entry. TTL is an unsigned 8 bit value in decimal format. ip_proto IP_PROTO Match on layer four protocol. IP_PROTO may be tcp, udp, sctp, icmp, icmpv6 or an unsigned 8bit value in hexadecimal format. ip_tos MASKED_IP_TOS Match on ipv4 TOS or ipv6 traffic-class - eight bits in hexadecimal format. A mask may be optionally provided to limit the bits which are matched. A mask is provided by following the value with a slash and then the mask. If the mask is missing then a match on all bits is assumed. ip_ttl MASKED_IP_TTL Match on ipv4 TTL or ipv6 hop-limit - eight bits value in decimal or hexadecimal format. A mask may be optionally provided to limit the bits which are matched. Same logic is used for the mask as with matching on ip_tos. dst_ip PREFIX src_ip PREFIX Match on source or destination IP address. PREFIX must be a valid IPv4 or IPv6 address, depending on the protocol option to tc fil- ter, optionally followed by a slash and the prefix length. If the prefix is missing, tc assumes a full-length host match. dst_port NUMBER src_port NUMBER Match on layer 4 protocol source or destination port number. Only available for ip_proto values udp, tcp and sctp which have to be specified in beforehand. tcp_flags MASKED_TCP_FLAGS Match on TCP flags represented as 12bit bitfield in in hexadecimal format. A mask may be optionally provided to limit the bits which are matched. A mask is provided by following the value with a slash and then the mask. If the mask is missing then a match on all bits is assumed. type MASKED_TYPE code MASKED_CODE Match on ICMP type or code. A mask may be optionally provided to limit the bits of the address which are matched. A mask is provided by following the address with a slash and then the mask. The mask must be as a number which represents a bitwise mask If the mask is missing then a match on all bits is assumed. Only available for ip_proto values icmp and icmpv6 which have to be specified in beforehand. arp_tip IPV4_PREFIX arp_sip IPV4_PREFIX Match on ARP or RARP sender or target IP address. IPV4_PREFIX must be a valid IPv4 address optionally followed by a slash and the prefix length. If the prefix is missing, tc assumes a full-length host match. arp_op ARP_OP Match on ARP or RARP operation. ARP_OP may be request, reply or an integer value 0, 1 or 2. A mask may be optionally provided to limit the bits of the operation which are matched. A mask is provided by following the address with a slash and then the mask. It may be provided as an unsigned 8 bit value representing a bitwise mask. If the mask is missing then a match on all bits is assumed. arp_sha MASKED_LLADDR arp_tha MASKED_LLADDR Match on ARP or RARP sender or target MAC address. A mask may be optionally provided to limit the bits of the address which are matched. A mask is provided by following the address with a slash and then the mask. It may be provided in LLADDR format, in which case it is a bitwise mask, or as a number of high bits to match. If the mask is missing then a match on all bits is assumed. enc_key_id NUMBER enc_dst_ip PREFIX enc_src_ip PREFIX enc_dst_port NUMBER Match on IP tunnel metadata. Key id NUMBER is a 32 bit tunnel key id (e.g. VNI for VXLAN tunnel). PREFIX must be a valid IPv4 or IPv6 address optionally followed by a slash and the prefix length. If the prefix is missing, tc assumes a full-length host match. Dst port NUMBER is a 16 bit UDP dst port. ip_flags IP_FLAGS IP_FLAGS may be either frag or nofrag to match on fragmented packets or not respectively. NOTES
As stated above where applicable, matches of a certain layer implicitly depend on the matches of the next lower layer. Precisely, layer one and two matches (indev, dst_mac and src_mac) have no dependency, MPLS and layer three matches (mpls_label, mpls_tc, mpls_bos, mpls_ttl, ip_proto, dst_ip, src_ip, arp_tip, arp_sip, arp_op, arp_tha, arp_sha and ip_flags) depend on the protocol option of tc filter, layer four port matches (dst_port and src_port) depend on ip_proto being set to tcp, udp or sctp, and finally ICMP matches (code and type) depend on ip_proto being set to icmp or icmpv6. There can be only used one mask per one prio. If user needs to specify different mask, he has to use different prio. SEE ALSO
tc(8), tc-flow(8) iproute2 22 Oct 2015 Flower filter in tc(8)
All times are GMT -4. The time now is 08:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy