mikrotik route appear and removes every second automatically - ip

Mikrotik OS v6.48.2 has routes
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 ADS 0.0.0.0/0 193.168.1.1 1 <<<<<<<<<<<<<<<<<<<<<
1 S ;;; dyno
0.0.0.0/0 192.168.8.1 5
2 S ;;; dyno
0.0.0.0/0 pppoe-out1 6
3 S ;;; dyno
0.0.0.0/0 193.168.1.1 10
4 ADC 10.32.181.1/32 x.x.x.147 pppoe-out1 0
5 ADC 10.32.238.1/32 x.x.x.250 pppoe-out2 0
6 A S ;;; dyno
x.x.x.18/32 193.168.1.1 1
7 ADC 192.168.8.0/24 192.168.8.100 lte1 0
8 ADC 192.168.88.0/24 192.168.88.1 bridge 0
9 ADC 193.168.0.0/16 193.168.0.177 ether1 0
But route 0 dissapears and appear again every 3-5 second.
So it becomes like
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 S ;;; dyno
0.0.0.0/0 192.168.8.1 5
1 A S ;;; dyno
0.0.0.0/0 pppoe-out1 6
2 S ;;; dyno
0.0.0.0/0 193.168.1.1 10
3 ADC 10.32.181.1/32 x.x.x.147 pppoe-out1 0
4 ADC 10.32.238.1/32 x.x.x.250 pppoe-out2 0
5 A S ;;; dyno
x.x.x.18/32 193.168.1.1 1
6 ADC 192.168.8.0/24 192.168.8.100 lte1 0
7 ADC 192.168.88.0/24 192.168.88.1 bridge 0
8 ADC 193.168.0.0/16 193.168.0.177 ether1 0
Nothing with LAN changed. No scripts are running. Every 3-5 seconds it again appears and disappears.
/ip address print
# ADDRESS NETWORK INTERFACE
0 ;;; defconf
192.168.88.1/24 192.168.88.0 bridge
1 D 193.168.0.177/16 193.168.0.0 ether1
2 D 192.168.8.100/24 192.168.8.0 lte1
3 D x.x.x.250/32 10.32.238.1 pppoe-out2
4 D x.x.x.147/32 10.32.181.1 pppoe-out1
How to solve this?

Fixed all!
Reason: DHCP client got error, so it retry to get new ip, removing routes before this and restoring previous after got an error.

Related

Computer network addressing (Subnet Masks)

I am trying to understand that Why 255.255.255.0 regarded as class B subnet mask,while many students in my class argue that the mask address is of class C.
Consider reading one of the relevant RFCs. RFC 870, for instance.
Here is an excerpt from that memo:
The third type of address, class C, has a 21-bit network number
and a 8-bit local address. The three highest-order bits are set
to 1-1-0. This allows 2,097,152 class C networks.
1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|1 1 0| NETWORK | Local Address |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Class C Address
In it, class C networks are defined to have 8-bit local address, hence the mask 255.255.255.0.

What is the purpose of payload in packet too big ICMPv6 message

I have gone through the RFC 4443 and 8201, perhaps I did not understand as I am new to some terminology described in these RFC but I want to understand the implication of using payload in ICMP packet to big message?
As per the RFC 4443
Linkt to 4443 RFC
The payload will contain as much of invoking packet not exceeding the minimum path MTU in packet to big message.
I don't understand the use case of such payload, even in the RFC 8201 there is no mention about the usages of payload.
only one comment present was
Added clarification in Section 4, "Protocol Requirements", that
nodes should validate the payload of ICMP PTB messages per RFC
4443, and that nodes should detect decreases in PMTU as fast as
possible.
What can be the implication validating payload in the PTB message and how should we validate the payload and based on what conditions?
Packet Too Big Message as per RFC 4443.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Type | Code | Checksum |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| MTU |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| As much of invoking packet |
+ as possible without the ICMPv6 packet +
| exceeding the minimum IPv6 MTU [IPv6] |

Are messages dropped on RAFT?

I'm reading about raft, but I got a bit confused when it comes to consensus after a network partition.
So, considering a cluster of 2 nodes, 1 Leader, 1 Follower.
Before partitioning, there where X messages written, successfully replicated, and then imagine that a network problem caused partitioning, so there are 2 partitions, A(ex-leader) and B(ex-follower), which are now both leaders (receiving writes):
before partition | Messages |x| Partition | Messages
Leader | 0 1 2 3 4 |x| Partition A | 5 6 7 8 9
Follower | 0 1 2 3 4 |x| Partition B | 5' 6' 7' 8' 9'
After the partition event, we've figured it out, what happens?
a) We elect 1 new leader and consider its log? (dropping messages of the new follower?
e.g:
0 1 2 3 4 5 6 7 8 9 (total of 10 messages, 5 dropped)
or even:
0 1 2 3 4 5' 6' 7' 8' 9' (total of 10 messages, 5 dropped)
(depending on which node got to be leader)
b) We elect a new leader and find a way to make consensus of all the messages?
0 1 2 3 4 5 5' 6 6' 7 7' 8 8' 9 9' (total of 15 messages, 0 dropped)
if b, is there any specific way of doing that? or it depends on client implementation? (e.g.: message timestamp...)
The leaders log is taken to be "the log" when the leader is elected and has successfully written its initial log entry for the term. However in your case the starting premise is not correct. In a cluster of 2 nodes, a node needs 2 votes to be leader, not 1. So given a network partition neither node will be leader.

What is the right order of bytes in a TCP header?

I'm trying to encode a TCP header myself, but can't understand what is the right order of bits/octets in it. This is what RFC 793 says:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source Port | Destination Port |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
...
This means that Source Port should take first two octets and the lowest bit should be in the first octet. This means to me that in order to encode source port 180 I should start my TCP header with these two bytes:
B4 00 ...
However, all examples I can find tell me to do it the other way around:
00 B4 ...
Why?
This means that Source Port should take first two octets
Correct.
and the lowest bit should be in the first octet.
Incorrect. It doesn't mean that. It doesn't say anything about it.
All multi-byte integers in all IP headers are represented in network byte order, which is big-endian. This is specified in RFC 1700.

reading raw data of MPU-9150 break board with Arduino micro

We are trying to connect the MPU-9150 break board to arduino micro and we have used the example code suggested in the sparkfun document (https://github.com/sparkfun/MPU-9150_Breakout/tree/master/firmware) to read the raw data. Our Vcc is always 3.3V. And our Baud rate is 9600. Here is what serial port monitor shows. all 9DOF values are zero
a/g/m: 0 0 0 0 0 0 0 0 0
a/g/m: 0 0 0 0 0 0 0 0 0
a/g/m: 0 0 0 0 0 0 0 0 0
a/g/m: 0 0 0 0 0 0 0 0 0
a/g/m: 0 0 0 0 0 0 0 0 0 …
When we use the code suggested in Arduino playground: http://playground.arduino.cc//Main/MPU-9150 Here is what we get. Now all values are -1
-1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
36.50 -1 -1 -1 -1 -1 -1 -1 -1 -1
........
We are also pretty sure about the connections. We really have no idea where we are doing wrong. Vcc, GND, SCL and SDA are all connected. any comment would be appreciated.
I am having the exact same problem with the second code you mention (-1 -1 -1 ....)
I had other errors with the first one and couldn't get it working at all. (I'm very new to arduino programming so almost 100% certain it will be something I'm doing wrong).
However I did get older code related to your first example working as follows:
[Using arduino uno connected gnd-gnd, vcc-3.3v, sda-A4 and scl-A5]
Download zip file from: https://github.com/sparkfun/MPU-9150_Breakout
(zip file is on right hand side)
Unzip, copy folders I2Cdev & MPU6150 into C:.../users/.../documents/arduino/libraries/
(or similar as appropriate where libraries are kept)
Run Arduino
Open the program: MPU9150_raw and upload
(it's found in MPU6150\examples\MPU9150_raw)
Open the Serial Monitor
Change baud rate to 36000
hopefully works!
I've recently also gotten the code at playground.arduino.cc//Main/MPU-9150 working with the Arduino Uno and the breakout board. If you are using the sparkfun breakout board I think you need to alter the code in two places to change the I2C address to 0x68 because AD0 on the board is pulled low rather than high. So you would search for int MPU9150_I2C_ADDRESS = 0x69; and change to 0x68 (It mentions this in the code so sorry if this is obvious to most people, just thought I'd post it anyway in case it helps someone else).
On the arduino webpage for the 6050 (I don't have enough reputation to post another link)
it says
"The I2C-address depends on the AD0 pin of the sensor. If it is connected to ground, the >address is 0x68. If it is connected to VLOGIC (+3.3V) it is 0x69. There are a few sensor >boards with the MPU-6050 sensor already soldered on it. Some of those boards have a pull->down resistor at AD0 (address = 0x68), others have a pull-up resistor (address = 0x69)."
Same problem.
Juste change the I2C adress of your device...
Connect, AD0 to GND and cho
i have the mpu9150 also. this code gives me raw values for all three internal chips. double check your baud rates. good luck
https://github.com/sparkfun/MPU-9150_Breakout/blob/master/firmware/MPU6050/Examples/MPU9150_raw/MPU9150_raw.ino

Resources