# The data packet is transmitted locally as the destination; steptablechaincomment1 is transmitted online (for example, Internet); 2 is connected to an interface (for example, eth0); 3 is the mangle prerouting chain used to mangle data packets, for example, the four Nat prerouting chains such as ToS are mainly used for DNAT. Do not worry about this chain, because in some cases the package will slide. 5. route determination. For example, if a packet is
through this interface, and the package is output through this port (the package sent in the chain forward, output, and postrouting ). Before the Interface Name, use "! "After description, it refers to the opposite name. If the interface name is followed by "+", all interfaces starting with this interface name will be matched. If this option is ignored, it is assumed as "+", then all arbitrary interfaces will be matched.
[!] -F, -- Fragment[!] -F -- multipartThis means that in the fragmented
Strategic Routing
Strategy means that the IP packet routing is based on the policies set by the network administrator as needed. For example, we can have A policy like this: "select X path for all packages that come directly from Network A; select Y path for others", or "select path F for all packages whose TOS is; other selected paths K ".
Cisco's network operating system (Cisco IOS) has adopted a new strategic routing mechanism since 11.0. Linux use
");StartActivity (data );
You can set the mail parameters to putExtra in Intent.
2. SEND with SEND [Java]Copy codeThe Code is as follows: Intent intent = new Intent (Intent. ACTION_SEND );String [] tos = {"way.ping.li@gmail.com "};String [] ccs = {"way.ping.li@gmail.com "};String [] bccs = {"way.ping.li@gmail.com "};Intent. putExtra (Intent. EXTRA_EMAIL, tos );Intent. putExtra (Intent. EXTRA_CC, ccs );Inte
is a special case of source NAT) and transparent proxies (a special case of the destination NAT).
Datagram Processing (Packet mangling)
The Mangle form is registered in the nf_ip_pre_routing and nf_ip_local_out hooks. Using the Mangle table, you can make changes to the datagram or attach some out-of-band data to the datagram. The current Mangle table supports modifying the TOS bit and setting SKB nfmard fields.
Seven, connection tracking
Connecti
.* May send more (we do).* Must not change this header information.* Must not reply to a multicast/broadcast IP address.* Must not reply to a multicast/broadcast MAC address.* Must reply to only the fragment.*/
void Icmp_send (struct sk_buff *skb_in, int type, int code, __BE32 info){struct IPHDR *iph;int room;struct ICMP_BXM *icmp_param;struct Rtable *rt = skb_rtable (skb_in);struct Ipcm_cookie IPC;struct FLOWI4 fl4;__be32 saddr;U8 TOS;U32 Mark;struct
protected]"); Data.putextra (Intent.extra_subject, "This is the title"); Data.putextra (Intent.extra_text, "This is the content"); StartActivity (data);Set the relevant parameters for the message by Putextra to intent.2. Sending using Send[Java]Copy CodeThe code is as follows: Intent Intent = new Intent (intent.action_send); String[] tos = {"[Email protected]"}; String[] CCS = {"[Email protected]"}; String[] BCCs = {"[Email protected]"}; Intent.putex
Disclaimer: Transfer from http://www.cnblogs.com/pengshao/archive/2011/12/26/2301461.htmlHeader file StackDemo.h1 #pragmaOnce//commonly used C + + pragma, the header file is the first to join, to ensure that the header files are only compiled once2typedefintDataType;3 Const intMaxstatcksize = -;//define the size of the stack4 classStackdemo5 {6 Public:7 //To analyze a constructor function8Stackdemo (void);9~stackdemo (void);Ten One //push stack out stack operation A voidPush (DataT
integer which is smaller than 3100.2> cocould be devided by 8.Since "3096" match the rule, so use it in IP layer to fragment.2. Then use the "3096" to caculate other length:3> Ethernet layer length: add the ethernet header length "14", the total length which is printed in ethernet layer is "3110 ".4> IP layber payload: Since the IP layber of IPV4 is 40, so the printed payload is 3056.5> ICMP length: And the ICMP tyoe of IPV6 is 8, so the printed ICMP payload is 3048.----------------------------
: nf_ip_pre_routing, Nf_ip_post_routing, and Nf_ip_local_out. The nf_ip_pre_routing implements the address translation of the source address that needs to forward the datagram, while the Nf_ip_post_routing addresses the destination address of the datagram that needs to be forwarded. The conversion of the destination address for the local datagram is implemented by Nf_ip_local_out.
Datagram Processing: The mangle table is registered in the nf_ip_pre_routing and nf_ip_local_out hooks. Using th
database) it replaces the traditional route table based on the destination address. RPDB selects an appropriate IP route based on the rules contained. These rules may contain many different types of keys. Therefore, these rules do not have a specific order by default. The rule search order or rule priority is set by the network or system administrator.
In Linux, RPDB is a list of linear rules sorted by numeric priority values. RPDB can match the source address, destination address,
Article title: Linux strategic routing application and in-depth analysis. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
Strategic routing
Strategy means that the IP packet routing is based on the policies set by the network administrator as needed. For example, we can have A policy like this: "select X path for all packages that come directly from Networ
function body.
Ii. Queue (this explanation is for personal understanding)
A wide range of stack applicationsStack LIFO (post-in-first-out)1. Wash dishes. The Used dishes are stacked one by one, so the top dishes are washed first and then the bottom ones.2. recursive function return address. The function address that the program executes first is pushed to the bottom until it is delivered to a function address with a clear return value.Back to the previous layer to process it until the bottommos
The grouping at the IP layer is called a datagram. This section focuses on the format of the datagram and how the IP packet header format is defined in Linux.First, the format of the datagram is as follows:which1. Version: version 4 and version 62. Header Length: Defines the total length of the datagram, calculated in 4 bytes. The header length is between 20~60 bytes.3, Service type: The first three is priority, the latter two is the TOS, the last one
ping [-t] [-a] [-N Count] [-l length] [-f] [-i TTL] [-v TOS] [-R Count] [-s count] [-j computer-list]│[-k computer-list] [-w timeout] Destination-list
Options:
-T Ping the specified host until stopped. To see statistics and continue-type control-break; To Stop-type Control-c.
Keep pinging the local host until you press CONTROL-C.
There is no special technique for this feature, but it can be used in conjunction with other parameters, which are ment
10.1.1.1/24, however, the next hop of this table item points directly to the S0 interface of RTA (for the reason, see the next hop attribute of BGP ). Without synchronization, RTE cannot directly go to the next hop of the route (because the routers RTD and RTC in the middle of the route do not go to the route 10.1.1.1/24 ). The concept is that the next hop is not reachable.
So here, do smart readers understand? BGP emphasizes that the reason for sync
synchronization, RTE cannot directly go to the next hop of the route (because the routers RTD and RTC in the middle of the route do not go to the route 10.1.1.1/24 ). The concept is that the next hop is not reachable.
So here, do smart readers understand? BGP emphasizes that the reason for synchronization is to ensure that the next hop can be reached. In the preceding example, when RTE wants to advertise the route information destined for 10.1.1.1/24
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.